package com.shiminghui;


import java.util.Random;

public class GetSum {
    public static void main(String[] args) {

        Random random = new Random();
        int arr[]=new int[10];
        int sum=0;
        for (int i =0;i<arr.length;i++){
            arr[i]=random.nextInt(100)+1;
            System.out.print(arr[i]+"\t");
            sum+=arr[i];
        }
        int avg = sum/arr.length;
        System.out.println("sum:"+sum+"\tavg:"+avg);
        int count=0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]<avg)
            {
                count++;
            }
        }

        System.out.println(count);

    }
}
